<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_DOM操作2</title>
</head>
<body>
<input type="text" id="i1">
<input type="text" id="i2">
<button onclick="f1()">点我查看</button>
<hr>
<h4>我是标题：<span id="ss"></span></h4>
<button onclick="f2()">按钮</button>
<script>
  function f2(){
     let spanE1 = document.querySelector('span');
    console.log(spanE1);
     let spanE2 = document.querySelector('#ss');
    console.log(spanE2);
    let spanE = document.getElementById('ss');
    console.log(spanE);
    spanE.innerHTML='我是修改后的内容';
  }
  function f1(){
    let inputE = document.querySelector('#i1');
    console.log(inputE);
    let num = document.querySelector('#i2').value;
    console.log(num,typeof num);
    num = parseFloat(num);
    console.log(num,typeof num);
  }


</script>

</body>
</html>